package cn.zhqr.manage.service;

import cn.zhqr.common.bean.UserInfo;
import cn.zhqr.common.util.collections.Lists;
import cn.zhqr.db.model.Admin;

import java.util.List;

public class ManageUserService {
    public static final ManageUserService instance = new ManageUserService();


    private static final List<String> roles = Lists.arrayList("admin");
    public UserInfo getUserInfo(Admin admin){
        UserInfo userInfo = new UserInfo();
        userInfo.setUserid(admin.getId());
        userInfo.setNickname(admin.getRealName());
        userInfo.setAvatar(admin.getAvatar());
        userInfo.setRoles(roles);
        return userInfo;
    }
}
